Republic::Application.routes.draw do
  root :to => 'welcome#index'

  controller :sessions do
    get  'login' => :new
    post 'login' => :create
    delete 'logout' => :destroy
  end

  get 'register' => 'users#new', :as => :register

  get '/users/:user_id/profile' => 'users#show', :as => :user_profile
  get '/users/:user_id/profile/edit' => 'users#edit', :as => :edit_user_profile

  resources :users do
    resources :articles
  end

end
